package com.cskaoyan.servlet;

import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.common.CommonServlet;
import com.cskaoyan.service.DashboardService;
import com.cskaoyan.service.RegionService;
import com.cskaoyan.service.impl.DashboardServiceImpl;
import com.cskaoyan.service.impl.RegionServiceImpl;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;

@WebServlet("/admin/*")
public class AdminDashboardServlet extends CommonServlet {
    DashboardService dashboardService = new DashboardServiceImpl();

    public BaseRespVo dashboard(HttpServletRequest request, HttpServletResponse response) {
        HashMap dataMap = dashboardService.countTotal();
        return BaseRespVo.ok(dataMap);
    }
}
